# -*- coding: utf-8 -*-
# 管理蓝图
from flask import Blueprint, render_template, session

ad_bp = Blueprint('admin', __name__)


@ad_bp.before_request
def auth_admin():
    if session.get('role') == 'admin' and session.get('islogin') == 'true':
        return
    else:
        return "perm-denied"


@ad_bp.route('/admin/center')
def admin_center():
    return render_template('admincenter.html')
